package com.jiyun;
/*
 * @Author:limengyao
 * @Date:2023-07-26 10:46
 * @Filename:R
 *
 */

import lombok.Data;

@Data
public class R<T> {
    private   String code;
    private  String message;
    private T data;

    public static R<Object> success(Object data){
        R<Object> r = new R<>();
        r.setCode("1");
        r.setMessage("SUCCESS");
        r.setData(data);
        return r;
    }

    public static R<Object> error(){
        R<Object> r = new R<>();
        r.setCode("2");
        r.setMessage("error");
        return r;
    }


}
